*------------- Upper-Body Strength and Political Egalitarianism: Twelve Conceptual Replications ------------------------------------*
*----------------------------------------------------- STUDY 7 ---------------------------------------------------------------------*
** Creates gender variable
clonevar gender = Q102

** Creates age variable
recode Q101 (997=.), generate(age)

** Creates education variable
recode Q103 (988=.), generate(education)

** Creates SDO variable
tab1 Q34_1 Q34_2 Q34_3 Q34_4

recode Q34_1 Q34_2 (988=.)
recode Q34_3 Q34_4 (1=7) (2=6) (3=5) (4=4) (5=3) (6=2) (7=1) (988=.)

alpha Q34_1 Q34_2 Q34_3 Q34_4
corr Q34_1 Q34_2 Q34_3 Q34_4

egen sdo = rowmean(Q34_1 Q34_2 Q34_3 Q34_4)

* Recodes to 0-1 scale reflecting min. and max. values for males and females, respectively
summ sdo if gender == 2
generate SDO = (sdo-(r(min)))/(r(max)-r(min)) if gender == 2

summ sdo if gender == 1
replace SDO = (sdo-(r(min)))/(r(max)-r(min)) if gender == 1

bys gender: summ SDO


** Creates physical strength variable 
recode Q43 (988=.), generate(phys_str)

* Recodes to 0-1 scale reflecting min. and max. values for males and females, respectively
summ phys_str if gender == 2
generate phys_strength = (phys_str-(r(min)))/(r(max)-r(min)) if gender == 2

summ phys_str if gender == 1
replace phys_strength = (phys_str-(r(min)))/(r(max)-r(min)) if gender == 1


*-----------------------------------ANALYSES-------------------------------*
** Descriptives
tab gender
summ age

bys gender: summ phys_strength if age !=. & education !=. & SDO !=.

alpha Q34_1 Q34_2 Q34_3 Q34_4 if age !=. & phys_strength !=. & education !=.
bys gender: summ SDO if age !=. & phys_strength !=. & education !=.


** Females:
reg SDO phys_strength c.age c.education if gender == 2

** Males:
reg SDO phys_strength c.age c.education if gender == 1
